package com.studyprojectbacked.controller;

import com.studyprojectbacked.entity.RestBean;
import com.studyprojectbacked.entity.dto.AccountUser;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.SessionAttribute;

@RestController
@RequestMapping("/api/user")
public class UserController {

  @GetMapping("/me")
  public RestBean<AccountUser> me(@SessionAttribute("account") AccountUser user) {
    return RestBean.success(user);
  }
}
